//index.js
//获取应用实例
const app = getApp()
Page({
  data: {
    imgUrl:['../../imgs/15.jpg','../../imgs/18.jpg','../../imgs/16.jpg'],
    imgsrv: app.globalData.srvlink + '/diancan/img/',
    goodsList:[]    
  },
  tableNo:'',
  
  onLoad: function (options) {    //全局数据中获得食品列表    
    var appInstance = getApp();
    appInstance.getUserInfo();
    var t_foodList = appInstance.globalData.foodList;
    this.setData({
      businessmenNo: appInstance.globalData.businessmenNo,
      tableNo: appInstance.globalData.tableNo     
    });
    this.getGoodsList();      
   
  },
  getGoodsList(){
    var that = this
    wx.showLoading();
    wx.request({
      url: app.globalData.srvlink + '/diancan/goodsList/',      
      method: 'GET',
      header: {
        'content-type': 'application/json'
      },
      success: function (res) {
        wx.hideLoading()        
        that.setData({goodsList:res.data.data})
                
      }
    })
  }

  })
